import httpFetch from 'share/httpFetch';
import config from 'config';
import errorMessage from 'share/errorMessage';
export default {
  getTableUrl() {
    return new Promise((resolve, reject) => {
      httpFetch.get(config.baseUrl + '/report/getTableAuUrl')
        .then((response) => {
          resolve(response)
        })
        .catch((err) => {
          errorMessage(err.response);
          reject(err.response);
        })
    })
  },

  //测试报表1
  getReport1(params){
    // let params={
    //   userId
    // }
    return new Promise((resolve, reject) => {
      httpFetch.get(config.baseUrl + '/report/api/qlik/report/search/report1',params)
        .then((response) => {
          resolve(response)
        })
        .catch((err) => {
          errorMessage(err.response);
          reject(err.response);
        })
    })
  },
  //测试报表2
  getReport2(params){
    // let params={
    //   userId
    // }
    return new Promise((resolve, reject) => {
      httpFetch.get(config.baseUrl + '/report/api/qlik/report/search/report2',params)
        .then((response) => {
          resolve(response)
        })
        .catch((err) => {
          errorMessage(err.response);
          reject(err.response);
        })
    })
  },
}
